package top.xchch.creational.factory.abstractfactory;

public class LDPizzaFactory extends BasePizzaFactory {
    @Override
    protected BasePizza createPizza(String orderType) {
        System.out.println("伦敦 Pizza 制作工厂");

        BasePizza pizza = null;
        if ("greek".equals(orderType)) {
            pizza = new LDGreekPizza();
        } else if ("pepper".equals(orderType)) {
            pizza = new LDPepperPizza();
        } else {
            throw new RuntimeException("没有这个类型的 pizza !!!");
        }

        return pizza;
    }
}
